package com.blackto.lib.eventbus;

import com.blackto.lib.eventbus.abstraction.IIntegrationEventHandler;
import com.blackto.lib.eventbus.event.IntegrationEvent;

import java.util.List;

public interface IEventBusSubscriptionsManager {
    boolean isEmpty();

    <TEvent extends IntegrationEvent, THandler extends IIntegrationEventHandler<TEvent>>
    void addSubscription(Class<TEvent> TEventType, Class<THandler> THandlerType);

    <TEvent extends IntegrationEvent, THandler extends IIntegrationEventHandler<TEvent>>
    void removeSubscription(Class<TEvent> TEventType, Class<THandler> THandlerType);


    boolean hasSubscriptionsForEvent(String eventName);

    Class<? extends IntegrationEvent> getEventTypeByName(String eventName);

    void clear();

    List<SubscriptionInfo> getHandlersForEvent(String eventName);

    String getEventName(Class<? extends IntegrationEvent> eventClass);
}
